LEX = flex -Pzz
CC = gcc

IDIR := ../../include
CFLAGS := -O2 -march=native -fomit-frame-pointer -finline-functions -pthread -Wall -I$(IDIR)
LINFLAGS := -lrt -lpthread
OUT := checker

all: checker.h checker.o scanner.o
	$(CC) checker.o scanner.o ../../bin/libopp.a -o $(OUT) $(LINFLAGS) 

%.tab.c %.tab.h: %.y
	bison -p zz -d $<

%.c: %.tab.c
	@mv $< $@

%.h: %.tab.h
	@mv $< $@

clean:
	@rm -f checker *.o checker.h scanner.h
